package com.sys.basics.service;

import com.sys.basics.entity.SysOrg;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.validation.constraints.NotNull;
import java.util.List;


/**
 * @author: ares
 * @date: 2021-10-08
 * @description: 系统组织表 服务类
 */
public interface SysOrgService extends IService<SysOrg> {
    SysOrg getTreeById(Long id);

    SysOrg getTreeByIdWithRole(Long id);

    List<SysOrg> getChildrenTreeByParentId(Long parentId);

    List<SysOrg> getChildrenTreeByParentIdWithRole(Long parentId);

    SysOrg getTreeByIdAsLeaf(Long id);

    boolean removeSelfAndChildrenById(Long id);

    List<SysOrg> getCurrentUserOrgs(Long userId);

    List<SysOrg> getCurrentUserOrgsWithRole(Long userId);

    List<SysOrg> getListByOrgEntity(SysOrg org);

    List<SysOrg> getChildrenByParentId(Long parentId);

    List<SysOrg> getChildrenByParentIdWithRole(Long parentId);

    List<SysOrg> getListByUserIdWithRole(Long userId, String currentOrgType);

}
